package com.zsrt.java.day20161226.zzm.demo03;

import java.util.Scanner;

public class JiuJiuTest {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
			System.out.println("请输入九九乘法表的行数:");
			int row = sc.nextInt();
			aa(row);
			System.out.println("继续请按c,退出请按y");
			String temp = sc.next();
			if(temp.equals("y")){
				System.out.println("程序已经退出.....");
				break;
			}
		}
		sc.close();
	}
	public static void aa(int row){
		for(int i=1;i<=row;i++){
			for(int j=1;j<=i;j++){
				System.out.print(i+"*"+j+"="+i*j+" ");
				if((j==2&&i==3)){
					System.out.print(" ");
				}
				if((j==2&&i==4)){
					System.out.print(" ");
				}
			}
			System.out.println();
		}
	}
	

}
